package cn.cors;


import lombok.Data;
import lombok.Getter;
import lombok.Setter;


@Data
public class Cors {
    @Setter
    @Getter
    private String join = ",";

    private String includeUrl;
    /**
     * 运行的原
     */
    private String allowOrigin;
    /**
     * 运行的方法
     */
    private String allowMethods;
    /**
     * 最大时间
     */
    private String maxAge;
    /**
     * 允许标头
     */
    private String allowHeaders;

    private String CharacterEncoding = "UTF-8";


    protected Cors(String includeUrl, String allowOrigin, String allowMethods, String maxAge, String allowHeaders) {
        this.includeUrl = includeUrl;
        this.allowOrigin = allowOrigin;
        this.allowMethods = allowMethods;
        this.maxAge = maxAge;
        this.allowHeaders = allowHeaders;
    }

    protected Cors(String includeUrl, String allowOrigin, String allowMethods, String maxAge, String allowHeaders, String characterEncoding) {
        this.includeUrl = includeUrl;
        this.allowOrigin = allowOrigin;
        this.allowMethods = allowMethods;
        this.maxAge = maxAge;
        this.allowHeaders = allowHeaders;
        CharacterEncoding = characterEncoding;
    }
}
